<%@ page language="java" contentType="text/html; charset=windows-1255"
    pageEncoding="windows-1255"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1255">
<title>Our Tagging Web System</title>

<script language="Javascript">
      function startLis() 
      {
    	  	document.getElementById('stopL').disabled=false;
    	  	document.getElementById('statL').disabled=true;
         	document.getElementById('SLiframe').src = "/StartLisServ";

      }
      
      function stopLis() 
      {
    	  	document.getElementById('statL').disabled=false;
    	  	document.getElementById('stopL').disabled=true;
         	document.getElementById('StLiframe').src = "/StopLisServ";
      }

      function startInit() 
      {
			 document.getElementById('startIni').disabled=true; 
			 document.getElementById('pauseIni').disabled=false;
			 document.getElementById('stopIni').disabled=false;
	         document.getElementById('SIiframe').src = "/StartInitServ";
	         document.getElementById('pBar').src = "/ProgressBar";
	         document.getElementById('statL').disabled=false;
      }

      function stopInit() 
      {
	    	 document.getElementById('startIni').disabled=false;
	    	 document.getElementById('stopIni').disabled=true;
	    	 document.getElementById('pauseIni').disabled=true;
	    	 document.getElementById('resIni').disabled=true;
	         document.getElementById('StIiframe').src = "/StopInitServ";
      }

      function pauseInit() 
      {
	    	 document.getElementById('pauseIni').disabled=true;
	    	 document.getElementById('resIni').disabled=false;
	         document.getElementById('PIiframe').src = "/PauseInitServ";
      }

      function continueInit() 
      {
	    	 document.getElementById('pauseIni').disabled=false;
	     	 document.getElementById('resIni').disabled=true;
	         document.getElementById('CIiframe').src = "/ContInitServ";
      }

      function addToYes() 
      {
    	  	var newtext = document.addTagsF.addTags.value;
    	  	if(newtext.length != 0 )
    	  	{
    			document.addTagsF.show_YesTags.value += newtext ;
    			document.addTagsF.show_YesTags.value += ",\n" ;
    			document.addTagsF.addTags.value = "";
    	  	}
      }

      function addToNo() 
      {
    	  	var newtext = document.addTagsF.addTags.value;
    	  	if(newtext.length != 0 )
    	  	{
  				document.addTagsF.show_NoTags.value += newtext;
  				document.addTagsF.show_NoTags.value += ",\n" ;
  				document.addTagsF.addTags.value = "";
    	  	}
      }

      function search() 
      {
	         stry = document.getElementById("show_YesTags").value;
	         strn = document.getElementById("show_NoTags").value;
	         document.addTagsF.show_YesTags.value = "";
	         document.addTagsF.show_NoTags.value = "";
	         document.getElementById('CIiframe').src = "/SearchServ?yes="+stry+"&no="+strn;
      }
      function progB(pb)
      {
    	  document.getElementById('prB').innerHTML = pb;
      }    

</script>
</head>
<body bgcolor="#C6AEC7" leftmargin="40">

<div id="text1" style="position:absolute; overflow:hidden; left:312px; top:46px; width:546px; height:89px; z-index:0">
<div class="wpmd">
<div align=center><font color="#800080" face="French Script MT" class="ws36" size="7"><B><I>My Web Tagging System</I></B></font></div>
</div></div>

	<iframe id="SLiframe" name="SLiframe" width ="0" height ="0" border="0">
    </iframe>
	
	<iframe id="StLiframe" name="StLiframe" width ="0" height ="0" border="0">
    </iframe>
    
    <iframe id="SIiframe" name="SIiframe" width ="0" height ="0" border="0">
    </iframe>
    
    <iframe id="StIiframe" name="StIiframe" width ="0" height ="0" border="0">
    </iframe>
    
    <iframe id="PIiframe" name="PIiframe" width ="0" height ="0" border="0">
    </iframe>
    
    <iframe id="CIiframe" name="CIiframe" width ="0" height ="0" border="0" >
    </iframe>
    
    <iframe id="pBar" name="pBar" width ="0" height ="0" border="0" >
    </iframe>
    
	<table border=0 width="100%">
	<tr>
	
	<td width="20%">

	<p> &nbsp; </p> <p> &nbsp; </p> <p> &nbsp; </p><p> &nbsp; </p>
	
	<form name="startlF" action="">
		<input type=button name=statL id=statL value="Start Listening" style="height: 3em; width: 10em" onclick="startLis()"/>
	</form>
	<p> </p>
	<form name="stoplF" action="">
		<input type=button name=stopL id=stopL value="Stop Listening" disabled="disabled" style="height: 3em; width: 10em" onclick="stopLis()"/>
	</form>
	<p> </p>
	<form name="startiniF" action="">
		<input type=button name=startIni id=startIni value="Start Initialization" style="height: 3em; width: 10em" onclick="startInit()"/>
	</form>
	<p> </p>
	<form name="pauseF" action="">
		<input type=button name=pauseIni id=pauseIni value="Pause Initialization" disabled="disabled" style="height: 3em; width: 10em" onclick="pauseInit()"/>
	</form>
	<p> </p>
	<form name="resF" action="">
		<input type=button name=resIni id=resIni value="Continue Initialization" disabled="disabled" style="height: 3em; width: 10em" onclick="continueInit()"/>
	</form>
	<p> </p>
	<form name="stopiniF" action="">
		<input type=button name=stopIni id=stopIni value="Stop Initialization" disabled="disabled" style="height: 3em; width: 10em" onclick="stopInit()"/>
	</form>
	</td>
	
	<td width="60%" >
	
	<form name=show_resault>
		<textarea name="show_Files" style="position:absolute;left:280px;top:173px;width:550px;height:300px;z-index:2" readonly="readonly" wrap="off">
		</textarea>
	</form>
	</td>
	
	<td width="20%" align="left">
	
		<div id="text2" style="position:absolute; overflow:hidden; left:818px; top:131px; width:546px; height:89px; z-index:0">
		<div class="wpmd">
		<div align=center><font color="#800080" face="Freestyle Script" class="ws36" size="6"><B><I>Select a Tag</I></B></font></div>
		</div></div>

		<form name="addTagsF" method="get" action="/SearchServ">
		<input name="addTags" type="text" style="position:absolute;width:200px;left:976px;top:169px;z-index:1">
		
		<div id="addToYesB" style="position:absolute; left:1104px; top:195px; z-index:9">
			<input type=button name="addToYesB" style="height: 3em; width: 5em"  value="Yes" width="150" height="31" onclick="addToYes()">
		</div>
			
		<textarea name="show_YesTags" id="show_YesTags" style="position:absolute;left:1090px;top:238px;width:103px;height:237px;z-index:2" readonly="readonly"></textarea>
		
		<div id="addToNoB" style="position:absolute; left:985px; top:195px;; z-index:9">
			<input type=button name="addToNoB" style="height: 3em; width: 5em"  value="No" width="150" height="31" onclick="addToNo()">
		</div>
			
		<textarea name="show_NoTags" id="show_NoTags" style="position:absolute;left:967px;top:238px;width:103px;height:237px;z-index:2" readonly="readonly"></textarea>

		<div id="searchB" style="position:absolute; left:1018px; top:485px; z-index:9">
			<input type=button name="searchB" id="searchBU"  style="height: 3em; width: 10em"  value="Search" width="150" height="31" onclick="search()">
		</div>
			
		</form>	
			
	</td>
	
	</table>
	
	<br>
	<table width="72%" border="1" cellpadding="0" cellspacing="2">
	<tr>
	<td height="19em" >
	<form name="prB" id="prB">
	<div class="meter-wrap"> 
		<div class="meter-value" style="background-color: #800080; width:0%;">
		<div class="meter-text" align="right">0%</div>        	
	</div></div>
	</form>
	</td>
	</tr>
	</table>
	
</body>
</html>